feat(acp): Add agent switcher to ACP CLI#84
Merged
CSRessel merged 2 commits intoDec 9, 2025
Conversation
…lection Implements agent/model switching for ACP mode: - Add /agent slash command to open agent picker popup - Add agent_picker component in nori/ with SelectionViewParams - Track pending agent selection - switch happens on next prompt submission - Modify /model to show disabled options in ACP mode with redirect to /agent - Add list_available_agents() and AcpAgentInfo to ACP registry - Add AppEvent variants for SetPendingAgent, ClearPendingAgent, SubmitWithAgentSwitch - Add ACP file tracing initialization to TUI - Add E2E tests for agent switching behavior
When switching agents, events from the OLD agent could leak into the NEW widget before SessionConfigured was received, causing the UI to show responses from the wrong agent. Fix: - Add expected_model field to ChatWidgetInit to specify expected model - Add session_configured_received flag to ChatWidget - Filter events in handle_codex_event() until SessionConfigured arrives with matching model name Also: - Add E2E tests for agent switch message flow - Remove unused ClearPendingAgent event and has_pending_agent method - Fix clippy warnings for dead code 🤖 Generated with [Nori](https://nori.ai) Co-Authored-By: Nori <contact@tilework.tech>
Collaborator
Author
Bugfix: Race Condition During Agent SwitchingThis commit fixes the race condition bug where switching from mock agent to real agent (claude/gemini) caused no model response until ESC was pressed. Root CauseWhen switching agents, both the OLD and NEW agents share the same FixAdded event filtering mechanism to
Changes
Testing
|
This was referenced Dec 9, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements agent/model switching for ACP mode: